package svl.videoplayer 
{
	import svl.videoplayer.VideoStateManager;
	import svl.videoplayer.assets.AssetManager;
	import svl.videoplayer.controls.VideoControls;
	import svl.videoplayer.player.VideoPlayer;
	
	import flash.display.Sprite;
	import flash.net.NetStream;		

	/**
	 * @author sanderl
	 */
	public class CustomVideoPlayer extends Sprite 
	{
		private var videoPlayer:VideoPlayer;
		private var videoURL:String = "testvideo.flv";
		
		public function CustomVideoPlayer()
		{
			videoPlayer = new VideoPlayer();
			addChild(videoPlayer);
			
			var ns:NetStream = videoPlayer.getNetStream();
			
			var stateManager:VideoStateManager = new VideoStateManager(ns, videoURL);
			stateManager.doPause();
			stateManager.stopPlay();
			stateManager.startPlay();
			stateManager.startPlay();
			
			var controls:VideoControls = new VideoControls();
			controls.y = stage.stageHeight - controls.height;
			addChild(controls);
		}
	}
}
